// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CatalogProductOption generated by hbm2java
 */
@Entity
@Table(name = "catalog_product_option", catalog = "magento")
public class CatalogProductOption implements java.io.Serializable {

	private Integer optionId;
	private CatalogProductEntity catalogProductEntity;
	private String type;
	private short isRequire;
	private String sku;
	private Integer maxCharacters;
	private String fileExtension;
	private Short imageSizeX;
	private Short imageSizeY;
	private int sortOrder;
	private Set catalogProductOptionTypeValues = new HashSet(0);
	private Set catalogProductOptionTitles = new HashSet(0);
	private Set catalogProductOptionPrices = new HashSet(0);

	public CatalogProductOption() {
	}

	public CatalogProductOption(CatalogProductEntity catalogProductEntity,
			String type, short isRequire, int sortOrder) {
		this.catalogProductEntity = catalogProductEntity;
		this.type = type;
		this.isRequire = isRequire;
		this.sortOrder = sortOrder;
	}

	public CatalogProductOption(CatalogProductEntity catalogProductEntity,
			String type, short isRequire, String sku, Integer maxCharacters,
			String fileExtension, Short imageSizeX, Short imageSizeY,
			int sortOrder, Set catalogProductOptionTypeValues,
			Set catalogProductOptionTitles, Set catalogProductOptionPrices) {
		this.catalogProductEntity = catalogProductEntity;
		this.type = type;
		this.isRequire = isRequire;
		this.sku = sku;
		this.maxCharacters = maxCharacters;
		this.fileExtension = fileExtension;
		this.imageSizeX = imageSizeX;
		this.imageSizeY = imageSizeY;
		this.sortOrder = sortOrder;
		this.catalogProductOptionTypeValues = catalogProductOptionTypeValues;
		this.catalogProductOptionTitles = catalogProductOptionTitles;
		this.catalogProductOptionPrices = catalogProductOptionPrices;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "option_id", unique = true, nullable = false)
	public Integer getOptionId() {
		return this.optionId;
	}

	public void setOptionId(Integer optionId) {
		this.optionId = optionId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id", nullable = false)
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "type", nullable = false, length = 50)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "is_require", nullable = false)
	public short getIsRequire() {
		return this.isRequire;
	}

	public void setIsRequire(short isRequire) {
		this.isRequire = isRequire;
	}

	@Column(name = "sku", length = 64)
	public String getSku() {
		return this.sku;
	}

	public void setSku(String sku) {
		this.sku = sku;
	}

	@Column(name = "max_characters")
	public Integer getMaxCharacters() {
		return this.maxCharacters;
	}

	public void setMaxCharacters(Integer maxCharacters) {
		this.maxCharacters = maxCharacters;
	}

	@Column(name = "file_extension", length = 50)
	public String getFileExtension() {
		return this.fileExtension;
	}

	public void setFileExtension(String fileExtension) {
		this.fileExtension = fileExtension;
	}

	@Column(name = "image_size_x")
	public Short getImageSizeX() {
		return this.imageSizeX;
	}

	public void setImageSizeX(Short imageSizeX) {
		this.imageSizeX = imageSizeX;
	}

	@Column(name = "image_size_y")
	public Short getImageSizeY() {
		return this.imageSizeY;
	}

	public void setImageSizeY(Short imageSizeY) {
		this.imageSizeY = imageSizeY;
	}

	@Column(name = "sort_order", nullable = false)
	public int getSortOrder() {
		return this.sortOrder;
	}

	public void setSortOrder(int sortOrder) {
		this.sortOrder = sortOrder;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductOption")
	public Set getCatalogProductOptionTypeValues() {
		return this.catalogProductOptionTypeValues;
	}

	public void setCatalogProductOptionTypeValues(
			Set catalogProductOptionTypeValues) {
		this.catalogProductOptionTypeValues = catalogProductOptionTypeValues;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductOption")
	public Set getCatalogProductOptionTitles() {
		return this.catalogProductOptionTitles;
	}

	public void setCatalogProductOptionTitles(Set catalogProductOptionTitles) {
		this.catalogProductOptionTitles = catalogProductOptionTitles;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "catalogProductOption")
	public Set getCatalogProductOptionPrices() {
		return this.catalogProductOptionPrices;
	}

	public void setCatalogProductOptionPrices(Set catalogProductOptionPrices) {
		this.catalogProductOptionPrices = catalogProductOptionPrices;
	}

}
